package jframe.entity.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.compass.annotations.Index;
import org.compass.annotations.Searchable;
import org.compass.annotations.SearchableProperty;
import org.compass.annotations.Store;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import jframe.entity.base.EntityBase;


/**
 * @描述:<p>用户信息 </p>
 * 
 * @作者: 叶平平(yepp)
 * 
 * @时间: 2011-6-19 下午01:10:20
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "sys_userinfo")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Searchable(root = false)
public class UserInfo extends EntityBase {

	/**
	 * 用户实体
	 */
	@OneToOne(mappedBy="userInfo",targetEntity=User.class,
			cascade={CascadeType.MERGE,CascadeType.PERSIST,CascadeType.REFRESH},
			fetch=FetchType.EAGER,optional=true)
	private User user;

	/**
	 * 姓名
	 */
	@Column(name = "name", nullable = true)
	@SearchableProperty(name = "name", index = Index.NA, store = Store.YES, boost = 1)
	private String name;

	/**
	 * 性别
	 */
	@Column(name = "sex", nullable = true)
	@SearchableProperty(name = "sex", index = Index.NA, store = Store.YES, boost = 1)
	private String sex;

	/**
	 * 邮箱
	 */
	@Column(name = "email", nullable = true)
	@SearchableProperty(name = "email", index = Index.NA, store = Store.YES, boost = 1)
	private String email;

	/**
	 * 手机
	 */
	@Column(name = "mobile", nullable = true)
	@SearchableProperty(name = "mobile", index = Index.NA, store = Store.YES, boost = 1)
	private String mobile;

	/**
	 * 电话
	 */
	@Column(name = "telephone", nullable = true)
	@SearchableProperty(name = "telephone", index = Index.NA, store = Store.YES, boost = 1)
	private String telephone;

	/**
	 * 邮编
	 */
	@Column(name = "postboy", nullable = true)
	@SearchableProperty(name = "postboy", index = Index.NA, store = Store.YES, boost = 1)
	private String postboy;

	/**
	 * 地址
	 */
	@Column(name = "address", nullable = true)
	@SearchableProperty(name = "address", index = Index.NA, store = Store.YES, boost = 1)
	private String address;

	/**
	 * 身份证
	 */
	@Column(name = "idCard", nullable = true)
	@SearchableProperty(name = "idCard", index = Index.NA, store = Store.YES, boost = 1)
	private String idCard;

	/**
	 * QQ
	 */
	@Column(name = "qq", nullable = true)
	@SearchableProperty(name = "qq", index = Index.NA, store = Store.YES, boost = 1)
	private String qq;

	/**
	 * 生日
	 */
	@Temporal(TemporalType.DATE)
	@Column(nullable = true, name = "birthday")
	@SearchableProperty(name = "birthday", index = Index.NA, store = Store.YES, boost = 1)
	protected Date birthday;

	/**
	 * 民族
	 */
	@Column(name = "folk", nullable = true)
	@SearchableProperty(name = "folk", index = Index.NA, store = Store.YES, boost = 1)
	private String folk;

	/**
	 * 婚姻状况
	 */
	@Column(name = "marriage", nullable = true)
	@SearchableProperty(name = "marriage", index = Index.NA, store = Store.YES, boost = 1)
	private String marriage;

	/**
	 * 政治面貌
	 */
	@Column(name = "government", nullable = true)
	@SearchableProperty(name = "government", index = Index.NA, store = Store.YES, boost = 1)
	private String government;

	/**
	 * 身高
	 */
	@Column(name = "stature", nullable = true)
	@SearchableProperty(name = "stature", index = Index.NA, store = Store.YES, boost = 1)
	private String stature;

	/**
	 * 体重
	 */
	@Column(name = "avoirdupois", nullable = true)
	@SearchableProperty(name = "avoirdupois", index = Index.NA, store = Store.YES, boost = 1)
	private String avoirdupois;
	/**
	 * 血型
	 */
	@Column(name = "bloodGroup", nullable = true)
	@SearchableProperty(name = "bloodGroup", index = Index.NA, store = Store.YES, boost = 1)
	private String bloodGroup;

	/**
	 * 出生地
	 */
	@Column(name = "nativityAddress", nullable = true)
	@SearchableProperty(name = "nativityAddress", index = Index.NA, store = Store.YES, boost = 1)
	private String nativityAddress;

	/**
	 * 户口所在地
	 */
	@Column(name = "householder", nullable = true)
	@SearchableProperty(name = "householder", index = Index.NA, store = Store.YES, boost = 1)
	private String householder;

	/**
	 * 文化程度
	 */
	@Column(name = "culture", nullable = true)
	@SearchableProperty(name = "culture", index = Index.NA, store = Store.YES, boost = 1)
	private String culture;

	/**
	 * 毕业院校
	 */
	@Column(name = "schoolName", nullable = true)
	@SearchableProperty(name = "schoolName", index = Index.NA, store = Store.YES, boost = 1)
	private String schoolName;

	/**
	 * 专业
	 */
	@Column(name = "speciality", nullable = true)
	@SearchableProperty(name = "speciality", index = Index.NA, store = Store.YES, boost = 1)
	private String speciality;

	/**
	 * 毕业时间
	 */
	@Temporal(TemporalType.DATE)
	@Column(nullable = true, name = "finishSchoolDate")
	@SearchableProperty(name = "finishSchoolDate", index = Index.NA, store = Store.YES, boost = 1)
	protected Date finishSchoolDate;

	/**
	 * 个人主页
	 */
	@Column(name = "homepage", nullable = true)
	@SearchableProperty(name = "homepage", index = Index.NA, store = Store.YES, boost = 1)
	private String homepage;

	/**
	 * 人员说明
	 */
	@Column(name = "description", nullable = true)
	@SearchableProperty(name = "description", index = Index.NA, store = Store.YES, boost = 1)
	private String description;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getPostboy() {
		return postboy;
	}

	public void setPostboy(String postboy) {
		this.postboy = postboy;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getFolk() {
		return folk;
	}

	public void setFolk(String folk) {
		this.folk = folk;
	}

	public String getMarriage() {
		return marriage;
	}

	public void setMarriage(String marriage) {
		this.marriage = marriage;
	}

	public String getGovernment() {
		return government;
	}

	public void setGovernment(String government) {
		this.government = government;
	}

	public String getStature() {
		return stature;
	}

	public void setStature(String stature) {
		this.stature = stature;
	}

	public String getAvoirdupois() {
		return avoirdupois;
	}

	public void setAvoirdupois(String avoirdupois) {
		this.avoirdupois = avoirdupois;
	}

	public String getBloodGroup() {
		return bloodGroup;
	}

	public void setBloodGroup(String bloodGroup) {
		this.bloodGroup = bloodGroup;
	}

	public String getNativityAddress() {
		return nativityAddress;
	}

	public void setNativityAddress(String nativityAddress) {
		this.nativityAddress = nativityAddress;
	}

	public String getHouseholder() {
		return householder;
	}

	public void setHouseholder(String householder) {
		this.householder = householder;
	}

	public String getCulture() {
		return culture;
	}

	public void setCulture(String culture) {
		this.culture = culture;
	}

	public String getSchoolName() {
		return schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

	public String getSpeciality() {
		return speciality;
	}

	public void setSpeciality(String speciality) {
		this.speciality = speciality;
	}

	public Date getFinishSchoolDate() {
		return finishSchoolDate;
	}

	public void setFinishSchoolDate(Date finishSchoolDate) {
		this.finishSchoolDate = finishSchoolDate;
	}

	public String getHomepage() {
		return homepage;
	}

	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
